﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThirdParty.Application.Model.ViewModel.Response.WxProgram;

namespace ThirdParty.Application.ThirdParty.Interfaces
{
    public interface IWxProgramService : IScoped
    {
        /// <summary>
        /// 微信小程序登录  
        /// 获取OpenID、session_key
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        WxLoginResponse Wxlogin(string code);

        /// <summary>
        /// 微信授权 解码获得用户手机号
        /// </summary>
        /// <param name="encryptedData"></param>
        /// <param name="aesIv"></param>
        /// <param name="session_key"></param>
        /// <param name="wechatId"></param>
        /// <returns></returns>
        string GetPhoneNumber(string encryptedData, string aesIv, string session_key, string wechatId);

        /// <summary>
        /// 获取接口调用凭据
        /// 根据code获得用户手机号
        /// 获取accessToken
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        string GetPhoneNumber(string code);
    }
}
